#pragma once

#include "MovingObject.h"
#include "../SGD Wrappers/SGD_Geometry.h"
#include "StaticObject.h"

class GrappleHook : public MovingObject
{
public:
	GrappleHook() = default;
	GrappleHook(BaseObject* Owner);
	~GrappleHook();


	void HandleCollision(BaseObject* pOther);
	void Update(float elapsedTime);
	void Render();
	void ReleaseAll();

	//Accessors
	BaseObject* GetOwner()	{ return m_pOwner; }
	bool		GetHasHit() { return hasHit; }

	//Mutators
	void	SetOwner(BaseObject* owner) { m_pOwner = owner; }

private:
	bool		hasHit = false;
	BaseObject* m_pOwner;

	SGD::Point newPosition;
	SGD::Point oldPosition;


	float	m_fDistance;
	float	m_fDestroyTimer = 0.0f;
};
